<div class="box" th:attrappend="class=${object.metaShowRelations ? '' : ' collapsed-box'}">
	<div class="box-header with-border">
		<th:block th:include="tool-collapse :: frag(${!object.metaShowRelations})"></th:block>
		<h3 class="box-title">MRelation</h3>
	</div>
	<div class="box-body">
	<div class="nav-tabs-custom">
	<ul class="nav nav-tabs">
		<th:block th:each="r : ${object.relations}">
			<li th:class="${r.metaShow ? 'active' : ''}">
				<a th:href="|#divMRelationContent-${r.id}|" data-toggle="tab">
					<span th:text="${r.name}"></span>
				</a>
			</li>
		</th:block>
	</ul>
	<div class="tab-content">
		<th:block th:each="r : ${object.relations}">
			<div class="tab-pane" th:id="|divMRelationContent-${r.id}|" th:attrappend="class=${r.metaShow ? ' active' : ''}">
				<!-- Main content -->
				<div class="box-body">
					<table class="table table-bordered" data-meta-po="MRelation">
						<tbody><tr>
							<th class="col-md-4">属性</th>
							<th class="col-md-5">值</th>
							<th class="col-md-3">操作</th>
						</tr>
						<th:block th:with="objectPropertyNames=${T(java.util.Arrays).asList('id', 'name', 'type', 'propertyIds', 'relatedObjectId', 'relatedName', 'relatedIds', 'relationObjectId', 'relationIds', 'relationInverseIds', 'index')}">
							<th:block th:each="property : ${objectPropertyNames}">
								<tr th:if="${property == 'id'}">
									<td>id</td>
									<td th:text="${r.id}"></td>
									<td>
									</td>
								</tr>
								<tr th:unless="${property == 'id'}">
									<td th:text="${property}"></td>
									<td><input class="form-control input-sm" th:value="${r[property]}"></td>
									<td>
										<th:block th:include="meta/man/object-operations :: frag(${r}, ${property})"></th:block>
									</td>
								</tr>
							</th:block>
							<th:block th:each="key : ${r.data.keySet()}">
								<tr>
									<td th:text="${'data.' + key}"></td>
									<td><input class="form-control input-sm" th:value="${r.data.get(key)}"></td>
									<td>
										<th:block th:include="meta/man/object-operations :: frag(${r}, ${'data.' + key})"></th:block>
									</td>
								</tr>
							</th:block>
							<tr>
								<td><input class="form-control input-sm" name="key"></td>
								<td><input class="form-control input-sm" name="value"></td>
								<td>
									<div class="btn-group btn-xs">
										<button type="button" class="btn btn-xs" data-meta-add>Add</button>
									</div>
								</td>
							</tr>
						</th:block>
						</tbody></table>
				</div>
				<!-- /.content -->
			</div>
		</th:block>
	</div>
	<!-- /.tab-content -->
</div>
</div>
</div>